package org.beholder;

import org.apache.log4j.Logger;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.PreparedStatement;
import java.sql.SQLException;

/**
 * Created with IntelliJ IDEA.
 * User: ddreval
 * Date: 18.10.12
 * Time: 14:10
 * To change this template use File | Settings | File Templates.
 */
public class CleanupServlet extends AbstractServlet {

	Logger logger = Logger.getLogger(ImageServlet.class);

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        deleteStoredImages();
        req.getRequestDispatcher("/list").forward(req,resp);
        closeResources();
    }

}
